package dao;

// Generated 04-Apr-2011 11:04:34 by Hibernate Tools 3.4.0.CR1

import java.util.List;

import hibernate.HibernateDAO;
import beans.TbMaquina;
import beans.TbSetor;
import javax.ejb.Stateless;

import org.hibernate.criterion.Order;

@Stateless
public class TbSetorDAO extends HibernateDAO<TbSetor, Integer> {
	public List<String> ListarSetorr(){
		return this.session.createQuery("Select concat(setorCod, ' - ', setorDescr)  from TbSetor order by setorCod asc").list();
}
	public List<String> ListarSector(){
		return this.session.createQuery("Select setorCod  from TbSetor order by setorCod asc").list();
}
	public List<String> ListarSectorDescr(){
		return this.session.createQuery("setorDescr  from TbSetor").list();
}

//	public List<TbSetor> listarSetores(){
	//	return listAll(Order.asc("setorCod"));
	//}
	
	
}